CC = gcc
CFLAGS = -c -I.. `pkg-config --cflags cmocka`
LDFLAGS = `pkg-config --libs cmocka`

SRCDIR = ../src
TEST = field_test

field_test_src = field_test.c \
	$(SRCDIR)/field.c

field_test_obj := $(field_test_src:.c=.o)

field_test: $(field_test_obj)
	$(CC) $(field_test_obj) $(LDFLAGS)-o $@
	@echo $(field_test_obj)

.PHONY: clean test

test:
	./field_test
clean:
	@rm *.o
	@rm $(TEST)

